
	<div class="adminrectangle"><h2><?php echo $title; ?></h2></div>
	<div class="grid_12 alpha omega"><p class='help'><?php echo lang('admin_teams_intro');?></div>
      <?php if ($this->session->flashdata('message')) { ?>
      <div class="infoMessage"><?php echo $this->session->flashdata('message');?></div>
      <?php } ?>
      <?php
      if(isset($help_message_text))
      {
        if($help_message_text !="")
        {
      ?>
          <div id="helpMessage" title="<?php echo lang($help_message_title);?>"><?php echo lang($help_message_text);?></div>
      <?php
        }
      }
      ?>
    <div class="grid_12 alpha omega">
    <?php
    $i = 1;
    foreach($teams as $team)
    {
    ?>

    <?php 
    if($i == 1 || $i == 5 || $i == 9 || $i == 13 || $i == 17 || $i == 21)
    {
      $class = 'grid_3 alpha '.$i;
    }
    elseif ($i % 4 == 0)
    {
      $class= 'grid_3 omega '.$i;
    }
    else
    {
      $class= 'grid_3 '.$i;
    } 
    ?>
    <div class="<?php echo $class;?>">
        <h5><?php echo $team->team_name." (".$team->team_shortname.") ".anchor('admin/edit_team/'.$team->team_number, 'Edit'); ?></h5>
        
        <table style="width:100%;">
    <?php
    foreach($team->team_riders as $rider)
    {
    ?>

    <?php if ($rider->active == 0) { $class = 'inactive';} else { $class="";} ?>
    
          <tr class="<?php echo $class;?>"><td><?php echo $rider->number;?><td><?php echo $rider->last_name." ".$rider->first_name;?></td></tr>
    <?php  
    }
    ?>
        </table>
      
    </div>
    <?php if ($i % 4 == 0)
    {
     ?>
     <div class='clear'></div> 
    <?php
    }    
    $i++;
    }
    ?>
    </div>

